package com.tencreat.domain.mall;

import com.baomidou.mybatisplus.annotation.*;
import com.tencreat.common.annotation.Excel;
import com.tencreat.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;


/**
 * 专区商品对应业务对象 mall_zone_goods
 *
 * @author wangkai
 * @date 2021-11-22
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
@TableName("mall_zone_goods")
public class MallZoneGoods extends BaseEntity<MallZoneGoods>{
    private static final long serialVersionUID = 1L;


    /** 专区商品关联id */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "ID")
    private Long id;


    /** 商品id */
    @Excel(name = "商品id")
    @ApiModelProperty(value= "商品id")
    @TableField("`goods_id`")
    private Long goodsId;

    /** 商品名称 */
    @Excel(name = "商品名称")
    @ApiModelProperty(value= "商品名称")
    @TableField("`goods_name`")
    private String goodsName;

    /** 商品图片 */
    @Excel(name = "商品图片")
    @ApiModelProperty(value= "商品图片")
    @TableField("`picture`")
    private String picture;

    /** 商品图片 */
    @Excel(name = "商品价格")
    @ApiModelProperty(value= "商品价格")
    @TableField(exist = false)
    private BigDecimal price;

    /** 商品图片 */
    @Excel(name = "商品价格")
    @ApiModelProperty(value= "商品价格")
    @TableField(exist = false)
    private BigDecimal retailPrice;



    /** 专区id */
    @Excel(name = "专区id")
    @ApiModelProperty(value= "专区id")
    @TableField("`zone_id`")
    private Long zoneId;


    /** 显示顺序 */
    @Excel(name = "显示顺序")
    @ApiModelProperty(value= "显示顺序")
    @TableField("`sort`")
    private Long sort;


    /** 删除标志（0代表存在 2代表删除） */
    @TableLogic
    @TableField("`del_flag`")
    private String delFlag;

    /** 租户ID */
    @Excel(name = "租户ID")
    @ApiModelProperty(value= "租户ID")
    @TableField("`tenant_id`")
    private Long tenantId;

    @TableField(exist = false)
    private String userName;

    @ApiModelProperty("排序字段")
    @TableField(exist = false)
    private String sortStr;

    @ApiModelProperty("排序规则")
    @TableField(exist = false)
    private String sortDesc;

    @ApiModelProperty("供应价")
    @TableField(exist = false)
    private BigDecimal supplyPrice;

    @ApiModelProperty("库存")
    @TableField(exist = false)
    private Integer inventory;

    @ApiModelProperty("专区名称")
    @TableField(exist = false)
    private String zoneName;
}
